package base.day06;

import java.util.Scanner;

public class Study4 {
    public static void main(String[] args) {
        //求大于2的平方根的整数部分
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个大于2的整数：");
        int number = sc.nextInt();
        int i = 0;
        while (true) {
            if (i * i == number) {
                break;
            } else if (i * i > number) {
                i--;
                break;
            }
            i++;
        }
        System.out.println(number + "保留整数的平方根是" + i);
    }
}
